import 'package:flutter/material.dart';

import 'MyHomePage.dart';

class Users extends StatelessWidget{
  @override
  Widget build(BuildContext context)=>Scaffold(
        appBar: new AppBar(
          title: new Text('用户'),
          leading: IconButton(
            icon: Icon(Icons.arrow_back),
            onPressed: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) => MyHomePage()));
            },
          ) ,
          backgroundColor: Colors.black,
          centerTitle: true,
          actions: <Widget>[
            // 非隐藏的菜单
            Row(
              children: <Widget>[
                Text("一键续借"),
                IconButton(
                    icon: new Icon(Icons.add_alarm),
                    tooltip: 'Add Alarm',
                    onPressed: () {}
                )
              ],
            )
      ]
    ),
    body: Column(
      children: <Widget>[
        Container(
          height: 150,
          decoration: BoxDecoration(
            image: DecorationImage(
              image: AssetImage("lib/image/background2.jpg"),
              fit: BoxFit.cover,
            ),
          ),
          child: Center(
            child: CircleAvatar(
              //头像半径
              radius: 40,
              //头像图片 -> NetworkImage网络图片，AssetImage项目资源包图片, FileImage本地存储图片
              backgroundImage: NetworkImage(
                  'https://pic2.zhimg.com/v2-639b49f2f6578eabddc458b84eb3c6a1.jpg'
              ),
            ),
          ),
        ),
        Text('我的借阅',
          style: TextStyle(
            decoration: TextDecoration.underline,
            fontStyle: FontStyle.normal,
            //letterSpacing: 10.0,
            fontSize: 20,
            fontWeight: FontWeight.w700,
          ),)
      ],
    ),
  );

}


